home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00108_ribbonScript.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  1.4 KB  |  53 lines

  1. on mouseDown
  2.   startBuffering()
  3.   puppetAll()
  4.   hideAllActors()
  5.   puppetTransition(51, 1)
  6.   set channel to the clickOn
  7.   set awardBmap to the castNum of sprite channel
  8.   set whichRibbon to the name of cast awardBmap
  9.   set staticRibbon to the number of cast "ribbonStatic"
  10.   if whichRibbon = "VTLribbon" then
  11.     puppetSound("award1")
  12.     set celList to [1, 2, 3, 4, 5, 4, 3, 2, 1]
  13.   else
  14.     if whichRibbon = "HHribbon" then
  15.       puppetSound("award2")
  16.       set celList to [1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 4]
  17.     else
  18.       if whichRibbon = "3Dribbon" then
  19.         puppetSound("award3")
  20.         set celList to [1, 2, 3, 3, 3, 1, 2, 3, 3, 3, 4, 5]
  21.       else
  22.         if whichRibbon = "MASribbon" then
  23.           puppetSound("award4")
  24.           set celList to [1, 2, 3, 2, 3, 2, 3, 2, 3, 1]
  25.         end if
  26.       end if
  27.     end if
  28.   end if
  29.   set the castNum of sprite the clickOn to staticRibbon
  30.   updateStage()
  31.   set soundOn to 1
  32.   repeat while soundOn
  33.     repeat with cel in celList
  34.       set the castNum of sprite channel to awardBmap + cel
  35.       updateStage()
  36.       startTimer()
  37.       repeat while the timer < 4
  38.       end repeat
  39.     end repeat
  40.     if not soundBusy(1) then
  41.       set soundOn to 0
  42.     end if
  43.   end repeat
  44.   set the castNum of sprite the clickOn to staticRibbon
  45.   updateStage()
  46.   set the castNum of sprite the clickOn to awardBmap
  47.   puppetTransition(51, 1)
  48.   updateStage()
  49.   puppetSound(0)
  50.   showAllActors()
  51.   flushBuffer()
  52. end
  53.